<?php
class ORMpz_school extends ORMBase {
  public function __construct() {
    parent::__construct('pz_school');
  }

  public function __toEpObject($myManager, $epObject, $object) {
    if (isset($object->track_id)) {
      $epObject->track_id =  $object->track_id;
    }
    if (isset($object->client_id)) {
      $epObject->client_id =  $object->client_id;
    }
    if (isset($object->school_name)) {
      $epObject->school_name =  $object->school_name;
    }
    if (isset($object->course_name)) {
      $epObject->course_name =  $object->course_name;
    }
    if (isset($object->course_level)) {
      $epObject->course_level =  $object->course_level;
    }
    if (isset($object->course_date_start)) {
      $epObject->course_date_start =  $object->course_date_start;
    }
    if (isset($object->attendance)) {
      $epObject->attendance =  $object->attendance;
    }
    if (isset($object->amount_paid)) {
      $epObject->amount_paid =  $object->amount_paid;
    }
    if (isset($object->paper_num)) {
      $epObject->paper_num =  $object->paper_num;
    }
    if (isset($object->english_weeks)) {
      $epObject->english_weeks =  $object->english_weeks;
    }
    if (isset($object->other_course_length)) {
      $epObject->other_course_length =  $object->other_course_length;
    }
    if (isset($object->next_payment_date)) {
      $epObject->next_payment_date =  $object->next_payment_date;
    }
    if (isset($object->file_note)) {
      $epObject->file_note =  $object->file_note;
    }
    if (isset($object->date_reminder)) {
      $epObject->date_reminder =  $object->date_reminder;
    }
    return $epObject;
  }

  public function __toObject($myManager, $epObject, $object) {
    $object->id = $epObject->oid;
    $object->track_id = $epObject->track_id;
    $object->client_id = $epObject->client_id;
    $object->school_name = $epObject->school_name;
    $object->course_name = $epObject->course_name;
    $object->course_level = $epObject->course_level;
    $object->course_date_start = $epObject->course_date_start;
    $object->attendance = $epObject->attendance;
    $object->amount_paid = $epObject->amount_paid;
    $object->paper_num = $epObject->paper_num;
    $object->english_weeks = $epObject->english_weeks;
    $object->other_course_length = $epObject->other_course_length;
    $object->next_payment_date = $epObject->next_payment_date;
    $object->file_note = $epObject->file_note;
    $object->date_reminder = $epObject->date_reminder;
    return $object;
  }
}
?>
